import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import permission from './modules/permission'
import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'
import addNsname from './add-nsname'

Vue.use(Vuex)

const state = {
}

export const mutations = {
}
addNsname(undefined, mutations)

export const actions = {}
addNsname(undefined, actions)

const modules = {
  [app.name]: app,
  [settings.name]: settings,
  [user.name]: user,
  [permission.name]: permission
}

const store = new Vuex.Store({
  state,
  modules,
  getters
})

export default store
